package com.defysoft.waukids;

import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONObject;

public class JsonParser implements PublicConstant, Data_Type, Custom_Data_Type {

	public static Member_Detail member_data(String message) {// 멤버 정보 저장

		Member_Detail member = new Member_Detail();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Mem_Email")) {
					member.PK_Mem_Email = jsonObject.getString("PK_Mem_Email");
				}
				if (jsonObject.has("Mem_Pass")) {
					member.Mem_Pass = jsonObject.getString("Mem_Pass");
				}
				if (jsonObject.has("FK_Sch_Mem_Code")) {
					member.FK_Sch_Mem_Code = jsonObject
							.getString("FK_Sch_Mem_Code");
				}
				if (jsonObject.has("FK_Cla_Mem_Code")) {
					member.FK_Cla_Mem_Code = jsonObject
							.getString("FK_Cla_Mem_Code");
				}
				if (jsonObject.has("Mem_Phone")) {
					member.Mem_Phone = jsonObject.getString("Mem_Phone");
				}
				if (jsonObject.has("Mem_Name")) {
					member.Mem_Name = jsonObject.getString("Mem_Name");
				}
				if (jsonObject.has("Mem_Uuid")) {
					member.Mem_Uuid = jsonObject.getString("Mem_Uuid");
				}
				if (jsonObject.has("Mem_CreateDate")) {
					member.Mem_CreateDate = jsonObject
							.getString("Mem_CreateDate");
				}
				if (jsonObject.has("Mem_Rank")) {
					member.Mem_Rank = jsonObject.getString("Mem_Rank");
				}
				if (jsonObject.has("Mem_Connect")) {
					member.Mem_Connect = jsonObject.getString("Mem_Connect");
				}
				if (jsonObject.has("Mem_Birth")) {
					member.Mem_Birth = jsonObject.getString("Mem_Birth");
				}
				if (jsonObject.has("Mem_Confirm")) {
					member.Mem_Confirm = jsonObject.getString("Mem_Confirm");
				}
			}
		} catch (Exception e) {
			return member;
		}
		return member;
	}
	
	

	public static School_Detail school_data(String message) {// 멤버 정보 저장
		member_data("");
		School_Detail school = new School_Detail();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {

				if (jsonObject.has("PK_Sch_Code")) {
					school.PK_Sch_Code = jsonObject.getString("PK_Sch_Code");
				}
				if (jsonObject.has("FK_Add_Sch_Code")) {
					school.FK_Add_Sch_Code = jsonObject
							.getString("FK_Add_Sch_Code");
				}
				if (jsonObject.has("Sch_Name")) {
					school.Sch_Name = jsonObject.getString("Sch_Name");
				}
				if (jsonObject.has("Sch_Add")) {
					school.Sch_Add = jsonObject.getString("Sch_Add");
				}
				if (jsonObject.has("Sch_Info")) {
					school.Sch_Info = jsonObject.getString("Sch_Info");
				}
				if (jsonObject.has("Sch_Logo")) {
					school.Sch_Logo = jsonObject.getString("Sch_Logo");
				}
				if (jsonObject.has("IsDelete")) {
					school.IsDelete = jsonObject.getString("IsDelete");
				}
				if (jsonObject.has("Sch_Document")) {
					school.Sch_Document = jsonObject.getString("Sch_Document");
				}
				if (jsonObject.has("Sch_Cctv")) {
					school.Sch_Cctv= jsonObject.getString("Sch_Cctv");
				}
				if (jsonObject.has("Sch_Cctv_Time_Start")) {
					school.Sch_Cctv_Time_Start= jsonObject.getString("Sch_Cctv_Time_Start");
				}
				if (jsonObject.has("Sch_Cctv_Time_Stop")) {
					school.Sch_Cctv_Time_Stop= jsonObject.getString("Sch_Cctv_Time_Stop");
				}

			}
		} catch (Exception e) {
			return school;
		}
		return school;
	}

	public static ArrayList<WK_SCHOOL> SelectSchool(String message) {

		ArrayList<WK_SCHOOL> list = new ArrayList<WK_SCHOOL>();
		WK_SCHOOL bc_School;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				bc_School = new WK_SCHOOL();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Sch_Code")) {
						bc_School.PK_Sch_Code = jsonObject
								.getString("PK_Sch_Code");
					}
					if (jsonObject.has("FK_Add_Sch_Code")) {
						bc_School.FK_Add_Sch_Code = jsonObject
								.getString("FK_Add_Sch_Code");
					}
					if (jsonObject.has("Sch_Name")) {
						bc_School.Sch_Name = jsonObject.getString("Sch_Name");
					}
					if (jsonObject.has("Sch_Info")) {
						bc_School.Sch_Info = jsonObject.getString("Sch_Info");
					}
					if (jsonObject.has("Sch_Add")) {
						bc_School.Sch_Add = jsonObject.getString("Sch_Add");
					}
					if (jsonObject.has("Sch_Logo")) {
						bc_School.Sch_Logo = jsonObject.getString("Sch_Logo");
					}
					if (jsonObject.has("IsDelete")) {
						bc_School.IsDelete = jsonObject.getString("IsDelete");
					}
					if (jsonObject.has("Sch_Document")) {
						bc_School.Sch_Document = jsonObject.getString("Sch_Document");
					}

				}
				list.add(bc_School);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}

	/**원생 리스트*/
	public static ArrayList<WK_STUDENT> Student_List(String message) {

		ArrayList<WK_STUDENT> list = new ArrayList<WK_STUDENT>();
		WK_STUDENT wk_student;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				wk_student = new WK_STUDENT();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Stu_Code")) {
						wk_student.PK_Stu_Code = jsonObject
								.getString("PK_Stu_Code");
					}
					if (jsonObject.has("FK_Sch_Stu_Code")) {
						wk_student.FK_Sch_Stu_Code = jsonObject
								.getString("FK_Sch_Stu_Code");
					}
					if (jsonObject.has("FK_Cla_Stu_Code")) {
						wk_student.FK_Cla_Stu_Code = jsonObject.getString("FK_Cla_Stu_Code");
					}
					if (jsonObject.has("FK_Bea_Stu_Code")) {
						wk_student.FK_Bea_Stu_Code = jsonObject.getString("FK_Bea_Stu_Code");
					}
					if (jsonObject.has("Stu_Name")) {
						wk_student.Stu_Name = jsonObject.getString("Stu_Name");
					}
					if (jsonObject.has("Stu_Birth")) {
						wk_student.Stu_Birth = jsonObject.getString("Stu_Birth");
					}
					if (jsonObject.has("Stu_Info")) {
						wk_student.Stu_Info = jsonObject.getString("Stu_Info");
					}
					if (jsonObject.has("Stu_Photo")) {
						wk_student.Stu_Photo = jsonObject.getString("Stu_Photo");
					}
					if (jsonObject.has("Stu_Email")) {
						wk_student.Stu_Email = jsonObject.getString("Stu_Email");
					}
					if (jsonObject.has("Rand_PK_Stu_Code")) {
						wk_student.Rand_PK_Stu_Code = jsonObject.getString("Rand_PK_Stu_Code");
					}
					if (jsonObject.has("PK_Stu_Con_Code")) {
						wk_student.PK_Stu_Con_Code = jsonObject.getString("PK_Stu_Con_Code");
					}
				}
				list.add(wk_student);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	/** 본인 정보 설정, 자녀정보, 비콘포함 */
	public static Mem_Main_SetProfile Member_Profile(String message) {
		Mem_Main_SetProfile mem_main_setprofile = new Mem_Main_SetProfile();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				mem_main_setprofile.PK_Stu_Code = jsonObject
						.getInt("PK_Stu_Code");
			}
			if (jsonObject != null) {
				mem_main_setprofile.FK_Sch_Stu_Code = jsonObject
						.getInt("FK_Sch_Stu_Code");
			}
			if (jsonObject != null) {
				mem_main_setprofile.FK_Cla_Stu_Code = jsonObject
						.getInt("FK_Cla_Stu_Code");
			}
			if (jsonObject != null) {
				mem_main_setprofile.FK_Bea_Stu_Code = jsonObject
						.getInt("FK_Bea_Stu_Code");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Stu_Name = jsonObject.getString("Stu_Name");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Stu_Birth = jsonObject
						.getString("Stu_Birth");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Stu_Info = jsonObject.getString("Stu_Info");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Stu_Photo = jsonObject
						.getString("Stu_Photo");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Stu_Email = jsonObject
						.getString("Stu_Email");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Rand_PK_Stu_Code = jsonObject
						.getInt("Rand_PK_Stu_Code");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Cla_Name = jsonObject.getString("Cla_Name");
			}
			if (jsonObject != null) {
				mem_main_setprofile.Bea_Id = jsonObject.getString("Bea_Id");
			}
		} catch (Exception e) {
			return mem_main_setprofile;
		}
		return mem_main_setprofile;
	}

	/** 공지내용 전체. 반이름. */
	public static NoticeDetailLoad noticeDetailLoad(String message) {
		NoticeDetailLoad noticeDetail = new NoticeDetailLoad();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				noticeDetail.PK_Not_Code = jsonObject.getInt("PK_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail.FK_Sch_Not_Code = jsonObject
						.getInt("FK_Sch_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail.FK_Cla_Not_Code = jsonObject
						.getInt("FK_Cla_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail.FK_Mem_Not_Email = jsonObject
						.getString("FK_Mem_Not_Email");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Name = jsonObject.getString("Not_Name");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Sub = jsonObject.getString("Not_Sub");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Date = jsonObject.getString("Not_Date");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Rate = jsonObject.getString("Not_Rate");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Stamp_A = jsonObject.getInt("Not_Stamp_A");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Stamp_B = jsonObject.getInt("Not_Stamp_B");
			}
			if (jsonObject != null) {
				noticeDetail.Not_Stamp_C = jsonObject.getInt("Not_Stamp_C");
			}
			if (jsonObject != null) {
				noticeDetail.Teacher = jsonObject.getString("Teacher");
			}
		} catch (Exception e) {
			return noticeDetail;
		}
		return noticeDetail;
	}
	
	/** 공지내용 전체. 반이름. 학원이름. */
	public static NoticeDetailLoad_Two NoticeDetailLoad_Two(String message) {
		NoticeDetailLoad_Two noticeDetail_Two = new NoticeDetailLoad_Two();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				noticeDetail_Two.PK_Not_Code = jsonObject.getInt("PK_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail_Two.FK_Sch_Not_Code = jsonObject
						.getInt("FK_Sch_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail_Two.FK_Cla_Not_Code = jsonObject
						.getInt("FK_Cla_Not_Code");
			}
			if (jsonObject != null) {
				noticeDetail_Two.FK_Mem_Not_Email = jsonObject
						.getString("FK_Mem_Not_Email");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Name = jsonObject.getString("Not_Name");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Sub = jsonObject.getString("Not_Sub");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Date = jsonObject.getString("Not_Date");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Rate = jsonObject.getString("Not_Rate");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Stamp_A = jsonObject.getInt("Not_Stamp_A");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Stamp_B = jsonObject.getInt("Not_Stamp_B");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Stamp_C = jsonObject.getInt("Not_Stamp_C");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Cla_Name = jsonObject.getString("Cla_Name");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Sch_Name = jsonObject.getString("Sch_Name");
			}
			if (jsonObject != null) {
				noticeDetail_Two.Not_Writer = jsonObject.getString("Not_Writer");
			}
		} catch (Exception e) {
			return noticeDetail_Two;
		}
		return noticeDetail_Two;
	}
	
	/** 원아수첩 내용 전체. 반이름. */
	public static DiaryDetailLoad diaryDetailLoad(String message) {
		DiaryDetailLoad diaryDetail = new DiaryDetailLoad();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				diaryDetail.PK_Dia_Code = jsonObject.getString("PK_Dia_Code");
			}
			if (jsonObject != null) {
				diaryDetail.FK_Sch_Dia_Code = jsonObject
						.getString("FK_Sch_Dia_Code");
			}
			if (jsonObject != null) {
				diaryDetail.FK_Cla_Dia_Code = jsonObject
						.getString("FK_Cla_Dia_Code");
			}
			if (jsonObject != null) {
				diaryDetail.FK_Mem_Dia_Email = jsonObject
						.getString("FK_Mem_Dia_Email");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Name = jsonObject.getString("Dia_Name");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Sub = jsonObject.getString("Dia_Sub");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Date = jsonObject.getString("Dia_Date");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Rate = jsonObject.getString("Dia_Rate");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Stamp = jsonObject.getString("Dia_Stamp");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Checkin = jsonObject.getString("Dia_Checkin");
			}
			if (jsonObject != null) {
				diaryDetail.Teacher = jsonObject.getString("Teacher");
			}
			if (jsonObject != null) {
				diaryDetail.Dia_Writer = jsonObject.getString("Dia_Writer");
			}
		} catch (Exception e) {
			return diaryDetail;
		}
		return diaryDetail;
	}
	/** 원아사진첩 내용 전체. 반이름. 학원이름 */
	public static AlbumDetailLoad albumDetailLoad(String message) {
		AlbumDetailLoad albumDetail = new AlbumDetailLoad();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				albumDetail.PK_Alb_Code = jsonObject.getString("PK_Alb_Code");
			}
			if (jsonObject != null) {
				albumDetail.FK_Sch_Alb_Code = jsonObject
						.getString("FK_Sch_Alb_Code");
			}
			if (jsonObject != null) {
				albumDetail.FK_Cla_Alb_Code = jsonObject
						.getString("FK_Cla_Alb_Code");
			}
			if (jsonObject != null) {
				albumDetail.FK_Mem_Alb_Email = jsonObject
						.getString("FK_Mem_Alb_Email");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Name = jsonObject.getString("Alb_Name");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Sub = jsonObject.getString("Alb_Sub");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Date = jsonObject.getString("Alb_Date");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Rate = jsonObject.getString("Alb_Rate");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Stamp_A = jsonObject.getString("Alb_Stamp_A");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Stamp_B = jsonObject.getString("Alb_Stamp_B");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Stamp_C = jsonObject.getString("Alb_Stamp_C");
			}
			if (jsonObject != null) {
				albumDetail.Cla_Name = jsonObject.getString("Cla_Name");
			}
			if (jsonObject != null) {
				albumDetail.Sch_Name = jsonObject.getString("Sch_Name");
			}
			if (jsonObject != null) {
				albumDetail.Mem_Name = jsonObject.getString("Mem_Name");
			}
			if (jsonObject != null) {
				albumDetail.Alb_Writer = jsonObject.getString("Alb_Writer");
			}
		} catch (Exception e) {
			return albumDetail;
		}
		return albumDetail;
	}

	/** 공지사항 이미지 */
	public static ArrayList<WK_NOTICE_PHOTO> noticePhotoList(String message) {

		ArrayList<WK_NOTICE_PHOTO> list = new ArrayList<WK_NOTICE_PHOTO>();
		WK_NOTICE_PHOTO noitcePhoto;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				noitcePhoto = new WK_NOTICE_PHOTO();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Not_Pho_Code")) {
						noitcePhoto.PK_Not_Pho_Code = jsonObject
								.getInt("PK_Not_Pho_Code");
					}
					if (jsonObject.has("FK_Sch_Not_Pho_Code")) {
						noitcePhoto.FK_Sch_Not_Pho_Code = jsonObject
								.getInt("FK_Sch_Not_Pho_Code");
					}
					if (jsonObject.has("FK_Cla_Not_Pho_Code")) {
						noitcePhoto.FK_Cla_Not_Pho_Code = jsonObject
								.getInt("FK_Cla_Not_Pho_Code");
					}
					if (jsonObject.has("FK_Not_Not_Pho_Code")) {
						noitcePhoto.FK_Not_Not_Pho_Code = jsonObject
								.getInt("FK_Not_Not_Pho_Code");
					}
					if (jsonObject.has("Not_Pho_IMG")) {
						noitcePhoto.Not_Pho_IMG = jsonObject
								.getString("Not_Pho_IMG");
					}
				}
				list.add(noitcePhoto);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	/** 원아수첩사항 이미지 */
	public static ArrayList<WK_DIARY_PHOTO> diaryPhotoList(String message) {
		
		ArrayList<WK_DIARY_PHOTO> list = new ArrayList<WK_DIARY_PHOTO>();
		WK_DIARY_PHOTO diaryPhoto;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				diaryPhoto = new WK_DIARY_PHOTO();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Dia_Pho_Code")) {
						diaryPhoto.PK_Dia_Pho_Code = jsonObject
								.getString("PK_Dia_Pho_Code");
					}
					if (jsonObject.has("FK_Sch_Dia_Pho_Code")) {
						diaryPhoto.FK_Sch_Dia_Pho_Code = jsonObject
								.getString("FK_Sch_Dia_Pho_Code");
					}
					if (jsonObject.has("FK_Cla_Dia_Pho_Code")) {
						diaryPhoto.FK_Cla_Dia_Pho_Code = jsonObject
								.getString("FK_Cla_Dia_Pho_Code");
					}
					if (jsonObject.has("FK_Dia_Dia_Pho_Code")) {
						diaryPhoto.FK_Dia_Dia_Pho_Code = jsonObject
								.getString("FK_Dia_Dia_Pho_Code");
					}
					if (jsonObject.has("Dia_Pho_IMG")) {
						diaryPhoto.Dia_Pho_IMG = jsonObject
								.getString("Dia_Pho_IMG");
					}
				}
				list.add(diaryPhoto);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/** 원아수첩사항 댓글 */
	public static ArrayList<WK_DIARY_REPLY> diaryReplyList(String message) {
		ArrayList<WK_DIARY_REPLY> list = new ArrayList<WK_DIARY_REPLY>();
		WK_DIARY_REPLY diaryReply;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				diaryReply = new WK_DIARY_REPLY();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Dia_Rep_Code")) {
						diaryReply.PK_Dia_Rep_Code = jsonObject
								.getString("PK_Dia_Rep_Code");
					}
					if (jsonObject.has("FK_Sch_Dia_Rep_Code")) {
						diaryReply.FK_Sch_Dia_Rep_Code = jsonObject
								.getString("FK_Sch_Dia_Rep_Code");
					}
					if (jsonObject.has("FK_Cla_Dia_Rep_Code")) {
						diaryReply.FK_Cla_Dia_Rep_Code = jsonObject
								.getString("FK_Cla_Dia_Rep_Code");
					}
					if (jsonObject.has("FK_Dia_Dia_Rep_Code")) {
						diaryReply.FK_Dia_Dia_Rep_Code = jsonObject
								.getString("FK_Dia_Dia_Rep_Code");
					}
					if (jsonObject.has("FK_Mem_Dia_Rep_Email")) {
						diaryReply.FK_Mem_Dia_Rep_Email = jsonObject
								.getString("FK_Mem_Dia_Rep_Email");
					}
					if (jsonObject.has("FK_Stu_Dia_Rep_Code")) {
						diaryReply.FK_Stu_Dia_Rep_Code = jsonObject
								.getString("FK_Stu_Dia_Rep_Code");
					}
					if (jsonObject.has("Dia_Rep_Sub")) {
						diaryReply.Dia_Rep_Sub = jsonObject
								.getString("Dia_Rep_Sub");
					}
					if (jsonObject.has("Dia_Rep_Date")) {
						diaryReply.Dia_Rep_Date = jsonObject
								.getString("Dia_Rep_Date");
					}
					if (jsonObject.has("Name")) {
						diaryReply.Name = jsonObject
								.getString("Name");
					}
					if(jsonObject.has("Rank")){
						diaryReply.Rank = jsonObject.getString("Rank");
					}
					if(jsonObject.has("Dia_Rep_Writer")){
						diaryReply.Dia_Writer = jsonObject.getString("Dia_Rep_Writer");
					}
				}
				list.add(diaryReply);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}

	/** 원아수첩사항 댓글 */
	public static ArrayList<AlbumDetailReply> albumReplyList(String message) {
		ArrayList<AlbumDetailReply> list = new ArrayList<AlbumDetailReply>();
		AlbumDetailReply albumReply;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				albumReply = new AlbumDetailReply();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Alb_Rep_Code")) {
						albumReply.PK_Alb_Rep_Code = jsonObject
								.getString("PK_Alb_Rep_Code");
					}
					if (jsonObject.has("FK_Sch_Alb_Rep_Code")) {
						albumReply.FK_Sch_Alb_Rep_Code = jsonObject
								.getString("FK_Sch_Alb_Rep_Code");
					}
					if (jsonObject.has("FK_Cla_Alb_Rep_Code")) {
						albumReply.FK_Cla_Alb_Rep_Code = jsonObject
								.getString("FK_Cla_Alb_Rep_Code");
					}
					if (jsonObject.has("FK_Alb_Alb_Rep_Code")) {
						albumReply.FK_Alb_Alb_Rep_Code = jsonObject
								.getString("FK_Alb_Alb_Rep_Code");
					}
					if (jsonObject.has("FK_Mem_Alb_Rep_Email")) {
						albumReply.FK_Mem_Alb_Rep_Email = jsonObject
								.getString("FK_Mem_Alb_Rep_Email");
					}
					if (jsonObject.has("FK_Stu_Alb_Rep_Code")) {
						albumReply.FK_Stu_Alb_Rep_Code = jsonObject
								.getString("FK_Stu_Alb_Rep_Code");
					}
					if (jsonObject.has("Alb_Rep_Sub")) {
						albumReply.Alb_Rep_Sub = jsonObject
								.getString("Alb_Rep_Sub");
					}
					if (jsonObject.has("Alb_Rep_Date")) {
						albumReply.Alb_Rep_Date = jsonObject
								.getString("Alb_Rep_Date");
					}
					if (jsonObject.has("Mem_Name")) {
						albumReply.Mem_Name = jsonObject
								.getString("Mem_Name");
					}
					if (jsonObject.has("Cla_Name")) {
						albumReply.Cla_Name = jsonObject
								.getString("Cla_Name");
					}
					if (jsonObject.has("Sch_Name")) {
						albumReply.Sch_Name = jsonObject
								.getString("Sch_Name");
					}
					if (jsonObject.has("Alb_Rep_Writer")) {
						albumReply.Alb_Writer = jsonObject
								.getString("Alb_Rep_Writer");
					}
				}
				list.add(albumReply);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	public static ArrayList<Notice_Main_Photo> Notice_Main_Photo_Parser(
			String message) {
		ArrayList<Notice_Main_Photo> list = new ArrayList<Custom_Data_Type.Notice_Main_Photo>();
		Notice_Main_Photo photo;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				photo = new Notice_Main_Photo();
				if (jsonObject != null) {
					photo.PK_Not_Pho_Code = jsonObject
							.getString("PK_Not_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Sch_Not_Pho_Code = jsonObject
							.getString("FK_Sch_Not_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Cla_Not_Pho_Code = jsonObject
							.getString("FK_Cla_Not_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Not_Not_Pho_Code = jsonObject
							.getString("FK_Not_Not_Pho_Code");
				}
				if (jsonObject != null) {
					photo.Not_Pho_IMG = jsonObject.getString("Not_Pho_IMG");
				}
				list.add(photo);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}

	public static ArrayList<Notice_Main_List> Notice_Main_List_Parser(
			String message) {
		ArrayList<Notice_Main_List> list = new ArrayList<Notice_Main_List>();
		Notice_Main_List main_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				main_list = new Notice_Main_List();
				if (jsonObject != null) {
					main_list.PK_Not_Code = jsonObject.getString("PK_Not_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Sch_Not_Code = jsonObject
							.getString("FK_Sch_Not_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Cla_Not_Code = jsonObject
							.getString("FK_Cla_Not_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Mem_Not_Email = jsonObject
							.getString("FK_Mem_Not_Email");
				}
				if (jsonObject != null) {
					main_list.Not_Name = jsonObject.getString("Not_Name");
				}
				if (jsonObject != null) {
					main_list.Not_Sub = jsonObject.getString("Not_Sub");
				}
				if (jsonObject != null) {
					main_list.Not_Date = jsonObject.getString("Not_Date");
				}
				if (jsonObject != null) {
					main_list.Not_Rate = jsonObject.getString("Not_Rate");
				}
				if (jsonObject != null) {
					main_list.Not_Stamp_A = jsonObject.getString("Not_Stamp_A");
				}
				if (jsonObject != null) {
					main_list.Not_Stamp_B = jsonObject.getString("Not_Stamp_B");
				}
				if (jsonObject != null) {
					main_list.Not_Stamp_C = jsonObject.getString("Not_Stamp_C");
				}
				if (jsonObject != null) {
					main_list.Teacher = jsonObject.getString("Teacher");
				}
				if (jsonObject != null) {
					main_list.Not_Writer = jsonObject.getString("Not_Writer");
				}
				if (jsonObject != null) {
					main_list.photo = Notice_Main_Photo_Parser(jsonObject
							.getString("photo"));
				}
				list.add(main_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	public static ArrayList<Diary_Main_Photo> Diary_Main_Photo_Parser(
			String message) {
		ArrayList<Diary_Main_Photo> list = new ArrayList<Custom_Data_Type.Diary_Main_Photo>();
		Diary_Main_Photo photo;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				photo = new Diary_Main_Photo();
				if (jsonObject != null) {
					photo.PK_Dia_Pho_Code = jsonObject
							.getString("PK_Dia_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Sch_Dia_Pho_Code = jsonObject
							.getString("FK_Sch_Dia_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Cla_Dia_Pho_Code = jsonObject
							.getString("FK_Cla_Dia_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Dia_Dia_Pho_Code = jsonObject
							.getString("FK_Dia_Dia_Pho_Code");
				}
				if (jsonObject != null) {
					photo.Dia_Pho_IMG = jsonObject.getString("Dia_Pho_IMG");
				}
				list.add(photo);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	public static ArrayList<Diary_Main_List> Diary_Main_List_Parser(
			String message) {
		ArrayList<Diary_Main_List> list = new ArrayList<Diary_Main_List>();
		Diary_Main_List main_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				main_list = new Diary_Main_List();
				if (jsonObject != null) {
					main_list.PK_Dia_Code = jsonObject.getString("PK_Dia_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Cla_Dia_Code = jsonObject.getString("FK_Cla_Dia_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Mem_Dia_Email = jsonObject.getString("FK_Mem_Dia_Email");
				}
				if (jsonObject != null) {
					main_list.FK_Sch_Dia_Code = jsonObject.getString("FK_Sch_Dia_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Stu_Dia_Code = jsonObject.getString("FK_Stu_Dia_Code");
				}
				if (jsonObject != null) {
					main_list.Dia_Checkin = jsonObject.getString("Dia_Checkin");
				}
				if (jsonObject != null) {
					main_list.Dia_Date = jsonObject.getString("Dia_Date");
				}
				if (jsonObject != null) {
					main_list.Dia_Name = jsonObject.getString("Dia_Name");
				}
				if (jsonObject != null) {
					main_list.Dia_Rate = jsonObject.getString("Dia_Rate");
				}
				if (jsonObject != null) {
					main_list.Dia_Stamp = jsonObject.getString("Dia_Stamp");
				}
				if (jsonObject != null) {
					main_list.Dia_Sub = jsonObject.getString("Dia_Sub");
				}
				if (jsonObject != null) {
					main_list.Teacher = jsonObject.getString("Teacher");
				}
				if (jsonObject != null) {
					main_list.Sendname = jsonObject.getString("Sendname");
				}
				if(jsonObject != null){
					main_list.rev_count = jsonObject.getString("rev_count");
				}
				if(jsonObject != null){
					main_list.Dia_Writer = jsonObject.getString("Dia_Writer");
				}
				if (jsonObject != null) {
					main_list.photo = Diary_Main_Photo_Parser(jsonObject
							.getString("photo"));
				}
				list.add(main_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	public static ArrayList<Album_Main_Photo> Album_Main_Photo_Parser(
			String message) {
		ArrayList<Album_Main_Photo> list = new ArrayList<Album_Main_Photo>();
		Album_Main_Photo photo;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				photo = new Album_Main_Photo();
				if (jsonObject != null) {
					photo.PK_Alb_Pho_Code = jsonObject
							.getString("PK_Alb_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Sch_Alb_Pho_Code = jsonObject
							.getString("FK_Sch_Alb_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Cla_Alb_Pho_Code = jsonObject
							.getString("FK_Cla_Alb_Pho_Code");
				}
				if (jsonObject != null) {
					photo.FK_Alb_Alb_Pho_Code = jsonObject
							.getString("FK_Alb_Alb_Pho_Code");
				}
				if (jsonObject != null) {
					photo.Alb_Pho_IMG = jsonObject.getString("Alb_Pho_IMG");
				}
				list.add(photo);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}

	public static ArrayList<Album_Main_List> Album_Main_List_Parser(
			String message) {
		ArrayList<Album_Main_List> list = new ArrayList<Album_Main_List>();
		Album_Main_List main_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				main_list = new Album_Main_List();
				if (jsonObject != null) {
					main_list.PK_Alb_Code = jsonObject.getString("PK_Alb_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Sch_Alb_Code = jsonObject
							.getString("FK_Sch_Alb_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Cla_Alb_Code = jsonObject
							.getString("FK_Cla_Alb_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Mem_Alb_Email = jsonObject
							.getString("FK_Mem_Alb_Email");
				}
				if (jsonObject != null) {
					main_list.Alb_Name = jsonObject.getString("Alb_Name");
				}
				if (jsonObject != null) {
					main_list.Alb_Sub = jsonObject.getString("Alb_Sub");
				}
				if (jsonObject != null) {
					main_list.Alb_Date = jsonObject.getString("Alb_Date");
				}
				if (jsonObject != null) {
					main_list.Alb_Rate = jsonObject.getString("Alb_Rate");
				}
				if (jsonObject != null) {
					main_list.Alb_Stamp_A = jsonObject.getString("Alb_Stamp_A");
				}
				if (jsonObject != null) {
					main_list.Alb_Stamp_B = jsonObject.getString("Alb_Stamp_B");
				}
				if (jsonObject != null) {
					main_list.Alb_Stamp_C = jsonObject.getString("Alb_Stamp_C");
				}
				if (jsonObject != null) {
					main_list.Teacher = jsonObject.getString("Teacher");
				}
				if (jsonObject != null) {
					main_list.Alb_Writer = jsonObject.getString("Alb_Writer");
				}
				if (jsonObject != null) {
					main_list.photo = Album_Main_Photo_Parser(jsonObject
							.getString("photo"));
				}
				list.add(main_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}

	public static WK_MESSAGE message_data(String message) {// 멤버 정보 저장

		WK_MESSAGE msg_data = new WK_MESSAGE();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Mes_Code")) {
					msg_data.PK_Mes_Code = jsonObject.getString("PK_Mes_Code");
				}	
				if (jsonObject.has("FK_Sch_Mes_Code")) {
					msg_data.FK_Sch_Mes_Code = jsonObject.getString("FK_Sch_Mes_Code");
				}	
				if (jsonObject.has("FK_Cla_Mes_Code")) {
					msg_data.FK_Cla_Mes_Code = jsonObject.getString("FK_Cla_Mes_Code");
				}	
				if (jsonObject.has("FK_Stu_Mes_Code")) {
					msg_data.FK_Stu_Mes_Code = jsonObject.getString("FK_Stu_Mes_Code");
				}	
				if (jsonObject.has("FK_Mem_Mes_Email")) {
					msg_data.FK_Mem_Mes_Email = jsonObject.getString("FK_Mem_Mes_Email");
				}	
				if (jsonObject.has("Mes_TypeOne")) {
					msg_data.Mes_TypeOne = jsonObject.getString("Mes_TypeOne");
				}	
				if (jsonObject.has("Mes_TypeTwo")) {
					msg_data.Mes_TypeTwo = jsonObject.getString("Mes_TypeTwo");
				}	
				if (jsonObject.has("Mes_TypeThree")) {
					msg_data.Mes_TypeThree = jsonObject.getString("Mes_TypeThree");
				}	
				if (jsonObject.has("Mes_TypeFour")) {
					msg_data.Mes_TypeFour = jsonObject.getString("Mes_TypeFour");
				}	
				if (jsonObject.has("Mes_TypeFive")) {
					msg_data.Mes_TypeFive = jsonObject.getString("Mes_TypeFive");
				}	
				if (jsonObject.has("Mes_TypeSix")) {
					msg_data.Mes_TypeSix = jsonObject.getString("Mes_TypeSix");
				}	
				if (jsonObject.has("Mes_Date")) {
					msg_data.Mes_Date = jsonObject.getString("Mes_Date");
				}	
				if (jsonObject.has("Mes_Check")) {
					msg_data.Mes_Check = jsonObject.getString("Mes_Check");
				}
				if (jsonObject.has("Stu_Name")) {
					msg_data.Stu_Name = jsonObject.getString("Stu_Name");
				}
				if (jsonObject.has("Mem_Email")) {
					msg_data.Mem_Email = jsonObject.getString("Mem_Email");
				}
				if (jsonObject.has("Mes_Writer")) {
					msg_data.Mes_Writer = jsonObject.getString("Mes_Writer");
				}
			}
		} catch (Exception e) {
			return msg_data;
		}
		return msg_data;
	}
	
	public static ArrayList<WK_MESSAGE_LIST> Message_List_Parser(
			String message) {
		ArrayList<WK_MESSAGE_LIST> list = new ArrayList<WK_MESSAGE_LIST>();
		WK_MESSAGE_LIST main_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				main_list = new WK_MESSAGE_LIST();
				if (jsonObject != null) {
					main_list.PK_Mes_Code = jsonObject.getString("PK_Mes_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Cla_Mes_Code = jsonObject.getString("FK_Cla_Mes_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Mem_Mes_Email = jsonObject.getString("FK_Mem_Mes_Email");
				}
				if (jsonObject != null) {
					main_list.FK_Sch_Mes_Code = jsonObject.getString("FK_Sch_Mes_Code");
				}
				if (jsonObject != null) {
					main_list.FK_Stu_Mes_Code = jsonObject.getString("FK_Stu_Mes_Code");
				}
				if (jsonObject != null) {
					main_list.Mes_Check = jsonObject.getString("Mes_Check");
				}
				if (jsonObject != null) {
					main_list.Mes_Date = jsonObject.getString("Mes_Date");
				}
				if (jsonObject != null) {
					main_list.mem_name = jsonObject.getString("mem_name");
				}
				if (jsonObject != null) {
					main_list.cla_name = jsonObject.getString("cla_name");
				}
				if (jsonObject != null) {
					main_list.stu_name = jsonObject.getString("stu_name");
				}
				if (jsonObject != null) {
					main_list.Mes_Category = jsonObject.getString("Mes_Category");
				}
				if (jsonObject != null) {
					main_list.Mes_Writer = jsonObject.getString("Mes_Writer");
				}
				list.add(main_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	

	/**캘린더 원생 리스트 정보*/
	public static ArrayList<WK_STUDENT_ATTEND_LIST> Calendar_Attend_Student_List(String message) {

		ArrayList<WK_STUDENT_ATTEND_LIST> list = new ArrayList<WK_STUDENT_ATTEND_LIST>();
		WK_STUDENT_ATTEND_LIST wk_student_attend_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				wk_student_attend_list = new WK_STUDENT_ATTEND_LIST();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Stu_Code")) {
						wk_student_attend_list.PK_Stu_Code = jsonObject
								.getString("PK_Stu_Code");
					}
					if (jsonObject.has("FK_Sch_Stu_Code")) {
						wk_student_attend_list.FK_Sch_Stu_Code = jsonObject
								.getString("FK_Sch_Stu_Code");
					}
					if (jsonObject.has("FK_Cla_Stu_Code")) {
						wk_student_attend_list.FK_Cla_Stu_Code = jsonObject.getString("FK_Cla_Stu_Code");
					}
					if (jsonObject.has("FK_Bea_Stu_Code")) {
						wk_student_attend_list.FK_Bea_Stu_Code = jsonObject.getString("FK_Bea_Stu_Code");
					}
					if (jsonObject.has("Stu_Name")) {
						wk_student_attend_list.Stu_Name = jsonObject.getString("Stu_Name");
					}
					if (jsonObject.has("Stu_Birth")) {
						wk_student_attend_list.Stu_Birth = jsonObject.getString("Stu_Birth");
					}
					if (jsonObject.has("Stu_Info")) {
						wk_student_attend_list.Stu_Info = jsonObject.getString("Stu_Info");
					}
					if (jsonObject.has("Stu_Photo")) {
						wk_student_attend_list.Stu_Photo = jsonObject.getString("Stu_Photo");
					}
					if (jsonObject.has("Stu_Email")) {
						wk_student_attend_list.Stu_Email = jsonObject.getString("Stu_Email");
					}
					if (jsonObject.has("Rand_PK_Stu_Code")) {
						wk_student_attend_list.Rand_PK_Stu_Code = jsonObject.getString("Rand_PK_Stu_Code");
					}
					if (jsonObject.has("cla_name")) {
						wk_student_attend_list.cla_name = jsonObject.getString("cla_name");
					}
					if (jsonObject.has("check")) {
						wk_student_attend_list.check = jsonObject.getString("check");
					}
					if (jsonObject.has("reason")) {
						wk_student_attend_list.reason = jsonObject.getString("reason");
					}
				}
				list.add(wk_student_attend_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	/**캘린더유치원별 반 이름 리스트 정보*/
	public static ArrayList<WK_CLASS_NAME_LIST> calendar_class_name_list(String message) {
		ArrayList<WK_CLASS_NAME_LIST> list = new ArrayList<WK_CLASS_NAME_LIST>();
		WK_CLASS_NAME_LIST wk_class_name_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				wk_class_name_list = new WK_CLASS_NAME_LIST();
				if (jsonObject != null) {
					if (jsonObject.has("Cla_Name")) {
						wk_class_name_list.Cla_Name = jsonObject
								.getString("Cla_Name");
					}
					if (jsonObject.has("PK_Cla_Code")) {
						wk_class_name_list.PK_Cla_Code = jsonObject
								.getString("PK_Cla_Code");
					}
				}
				list.add(wk_class_name_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	/**캘린더 일정 정보리스트*/
	public static ArrayList<WK_PROGRAM> program_list(String message) {
		ArrayList<WK_PROGRAM> list = new ArrayList<WK_PROGRAM>();
		WK_PROGRAM program_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				program_list = new WK_PROGRAM();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Pro_Code")) {
						program_list.PK_Pro_Code = jsonObject
								.getString("PK_Pro_Code");
					}
					if (jsonObject.has("FK_Cla_Pro_Code")) {
						program_list.FK_Cla_Pro_Code = jsonObject
								.getString("FK_Cla_Pro_Code");
					}
					if (jsonObject.has("FK_Sch_Pro_Code")) {
						program_list.FK_Sch_Pro_Code = jsonObject
								.getString("FK_Sch_Pro_Code");
					}
					if (jsonObject.has("FK_Stu_Pro_Code")) {
						program_list.FK_Stu_Pro_Code = jsonObject
								.getString("FK_Stu_Pro_Code");
					}
					if (jsonObject.has("Pro_Reason")) {
						program_list.Pro_Reason = jsonObject
								.getString("Pro_Reason");
					}
					if (jsonObject.has("Pro_Date")) {
						program_list.Pro_Date = jsonObject
								.getString("Pro_Date");
					}
					if (jsonObject.has("Pro_Check")) {
						program_list.Pro_Check = jsonObject
								.getString("Pro_Check");
					}
				}
				list.add(program_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	/**캘린더 출석 정보리스트*/
	public static ArrayList<WK_ATTEND> attend_list(String message) {
		ArrayList<WK_ATTEND> list = new ArrayList<WK_ATTEND>();
		WK_ATTEND attend_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				attend_list = new WK_ATTEND();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Att_Code")) {
						attend_list.PK_Att_Code = jsonObject
								.getString("PK_Att_Code");
					}
					if (jsonObject.has("FK_Cla_Att_Code")) {
						attend_list.FK_Cla_Att_Code = jsonObject
								.getString("FK_Cla_Att_Code");
					}
					if (jsonObject.has("FK_Sch_Att_Code")) {
						attend_list.FK_Sch_Att_Code = jsonObject
								.getString("FK_Sch_Att_Code");
					}
					if (jsonObject.has("FK_Stu_Att_Code")) {
						attend_list.FK_Stu_Att_Code = jsonObject
								.getString("FK_Stu_Att_Code");
					}
					if (jsonObject.has("Att_Date")) {
						attend_list.Att_Date = jsonObject
								.getString("Att_Date");
					}
					if (jsonObject.has("Att_Check")) {
						attend_list.Att_Check = jsonObject
								.getString("Att_Check");
					}
					if (jsonObject.has("Att_Reason")) {
						attend_list.Att_Reason = jsonObject
								.getString("Att_Reason");
					}
				}
				list.add(attend_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/**비콘 메세지 정보*/
	public static ArrayList<WK_STATE> state_list(String message) {
		ArrayList<WK_STATE> list = new ArrayList<WK_STATE>();
		WK_STATE state_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				state_list = new WK_STATE();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Sta_Code")) {
						state_list.PK_Sta_Code = jsonObject
								.getString("PK_Sta_Code");
					}
					if (jsonObject.has("FK_Sch_Gob_Sta_Code")) {
						state_list.FK_Sch_Gob_Sta_Code = jsonObject
								.getString("FK_Sch_Gob_Sta_Code");
					}
					if (jsonObject.has("FK_Stu_Gob_Sta_Code")) {
						state_list.FK_Stu_Gob_Sta_Code = jsonObject
								.getString("FK_Stu_Gob_Sta_Code");
					}
					if (jsonObject.has("Sta_Date")) {
						state_list.Sta_Date = jsonObject
								.getString("Sta_Date");
					}
					if (jsonObject.has("Sta_Message")) {
						state_list.Sta_Message = jsonObject
								.getString("Sta_Message");
					}
					if (jsonObject.has("Sta_Rank")) {
						state_list.Sta_Rank = jsonObject
								.getString("Sta_Rank");
					}	
					if (jsonObject.has("Sta_FK_Code")) {
						state_list.Sta_FK_Code = jsonObject
								.getString("Sta_FK_Code");
					}	
				}
				list.add(state_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/**결석 여부 확인*/
	public static ArrayList<WK_ATTEND_CHECK> att_check(String message) {
		ArrayList<WK_ATTEND_CHECK> list = new ArrayList<WK_ATTEND_CHECK>();
		WK_ATTEND_CHECK check_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				check_list = new WK_ATTEND_CHECK();
				if (jsonObject != null) {
					if (jsonObject.has("attcheck")) {
						check_list.attcheck = jsonObject
								.getString("attcheck");
					}
					if (jsonObject.has("Att_Date")) {
						check_list.Att_Date = jsonObject
								.getString("Att_Date");
					}
				}
				list.add(check_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/**비콘 메세지 정보*/
	public static ArrayList<WK_TEACHER_STATE> teacher_state_list(String message) {
		ArrayList<WK_TEACHER_STATE> list = new ArrayList<WK_TEACHER_STATE>();
		WK_TEACHER_STATE tstate_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				tstate_list = new WK_TEACHER_STATE();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Tea_Code")) {
						tstate_list.PK_Tea_Code = jsonObject
								.getString("PK_Tea_Code");
					}
					if (jsonObject.has("FK_Sch_Tea_Code")) {
						tstate_list.FK_Sch_Tea_Code = jsonObject
								.getString("FK_Sch_Tea_Code");
					}
					if (jsonObject.has("FK_Cla_Tea_Code")) {
						tstate_list.FK_Cla_Tea_Code = jsonObject
								.getString("FK_Cla_Tea_Code");
					}
					if (jsonObject.has("FK_Stu_Tea_Code")) {
						tstate_list.FK_Stu_Tea_Code = jsonObject
								.getString("FK_Stu_Tea_Code");
					}
					if (jsonObject.has("Tea_Message")) {
						tstate_list.Tea_Message = jsonObject
								.getString("Tea_Message");
					}
					if (jsonObject.has("Tea_Rank")) {
						tstate_list.Tea_Rank = jsonObject
								.getString("Tea_Rank");
					}
					if (jsonObject.has("Tea_Date")) {
						tstate_list.Tea_Date = jsonObject
								.getString("Tea_Date");
					}
					if (jsonObject.has("Tea_FK_Code")) {
						tstate_list.Tea_FK_Code = jsonObject
								.getString("Tea_FK_Code");
					}
					if (jsonObject.has("Tea_Mes_Category")) {
						tstate_list.Tea_Mes_Category = jsonObject
								.getString("Tea_Mes_Category");
					}
				}
				list.add(tstate_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/** 메인 슬라이드 자녀설정 정보*/
	public static MAIN_SLIDE_CHILDREN_LOAD Main_Slide_Children_Load(String message) {

		MAIN_SLIDE_CHILDREN_LOAD children_load = new MAIN_SLIDE_CHILDREN_LOAD();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Stu_Code")) {
					children_load.PK_Stu_Code = jsonObject.getString("PK_Stu_Code");
				}
				if (jsonObject.has("FK_Sch_Stu_Code")) {
					children_load.FK_Sch_Stu_Code = jsonObject.getString("FK_Sch_Stu_Code");
				}
				if (jsonObject.has("FK_Cla_Stu_Code")) {
					children_load.FK_Cla_Stu_Code = jsonObject.getString("FK_Cla_Stu_Code");
				}
				if (jsonObject.has("FK_Bea_Stu_Code")) {
					children_load.FK_Bea_Stu_Code = jsonObject.getString("FK_Bea_Stu_Code");
				}
				if (jsonObject.has("Stu_Name")) {
					children_load.Stu_Name = jsonObject.getString("Stu_Name");
				}
				if (jsonObject.has("Stu_Birth")) {
					children_load.Stu_Birth = jsonObject.getString("Stu_Birth");
				}
				if (jsonObject.has("Stu_Info")) {
					children_load.Stu_Info = jsonObject.getString("Stu_Info");
				}
				if (jsonObject.has("Stu_Photo")) {
					children_load.Stu_Photo = jsonObject.getString("Stu_Photo");
				}
				if (jsonObject.has("Stu_Email")) {
					children_load.Stu_Email = jsonObject.getString("Stu_Email");
				}
				if (jsonObject.has("Rand_PK_Stu_Code")) {
					children_load.Rand_PK_Stu_Code = jsonObject.getString("Rand_PK_Stu_Code");
				}
				if (jsonObject.has("classname")) {
					children_load.classname = jsonObject.getString("classname");
				}
				if (jsonObject.has("schoolname")) {
					children_load.schoolname = jsonObject.getString("schoolname");
				}
				if (jsonObject.has("Mem_Phone")) {
					children_load.Mem_Phone = jsonObject.getString("Mem_Phone");
				}
				if (jsonObject.has("beaconid")) {
					children_load.beaconid = jsonObject.getString("beaconid");
				}
			}
		} catch (Exception e) {
			return children_load;
		}
		return children_load;
	}
	
	/**하원버스위치정보*/
	public static WK_BACKBUS_STUDENT backbus_state(String message) {

		WK_BACKBUS_STUDENT bus_state = new WK_BACKBUS_STUDENT();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Bac_Stu_Code")) {
					bus_state.PK_Bac_Stu_Code = jsonObject
							.getString("PK_Bac_Stu_Code");
				}
				if (jsonObject.has("FK_Bac_Bac_Stu_Code")) {
					bus_state.FK_Bac_Bac_Stu_Code = jsonObject
							.getString("FK_Bac_Bac_Stu_Code");
				}
				if (jsonObject.has("FK_Sch_Bac_Stu_Code")) {
					bus_state.FK_Sch_Bac_Stu_Code = jsonObject
							.getString("FK_Sch_Bac_Stu_Code");
				}
				if (jsonObject.has("FK_Stu_Bac_Stu_Code")) {
					bus_state.FK_Stu_Bac_Stu_Code = jsonObject
							.getString("FK_Stu_Bac_Stu_Code");
				}
				if (jsonObject.has("Bac_Stu_Address")) {
					bus_state.Bac_Stu_Address = jsonObject
							.getString("Bac_Stu_Address");
				}
				if (jsonObject.has("Bac_Stu_Order")) {
					bus_state.Bac_Stu_Order = jsonObject
							.getString("Bac_Stu_Order");
				}
			}
		} catch (Exception e) {
			return bus_state;
		}
		return bus_state;
	}
	
	/**등원버스위치정보*/
	public static WK_GOBUS_STUDENT gobus_state(String message) {

		WK_GOBUS_STUDENT bus_state = new WK_GOBUS_STUDENT();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Gob_Stu_Code")) {
					bus_state.PK_Gob_Stu_Code = jsonObject
							.getString("PK_Gob_Stu_Code");
				}
				if (jsonObject.has("FK_Gob_Gob_Stu_Code")) {
					bus_state.FK_Gob_Gob_Stu_Code = jsonObject
							.getString("FK_Gob_Gob_Stu_Code");
				}
				if (jsonObject.has("FK_Sch_Gob_Stu_Code")) {
					bus_state.FK_Sch_Gob_Stu_Code = jsonObject
							.getString("FK_Sch_Gob_Stu_Code");
				}
				if (jsonObject.has("FK_Stu_Gob_Stu_Code")) {
					bus_state.FK_Stu_Gob_Stu_Code = jsonObject
							.getString("FK_Stu_Gob_Stu_Code");
				}
				if (jsonObject.has("Gob_Stu_Address")) {
					bus_state.Gob_Stu_Address = jsonObject
							.getString("Gob_Stu_Address");
				}
				if (jsonObject.has("Gob_Stu_Order")) {
					bus_state.Gob_Stu_Order = jsonObject
							.getString("Gob_Stu_Order");
				}
			}
		} catch (Exception e) {
			return bus_state;
		}
		return bus_state;
	}
	
	public static ArrayList<WK_GOBUS_STUDENT> gobus_student(String message) {
		ArrayList<WK_GOBUS_STUDENT> list = new ArrayList<WK_GOBUS_STUDENT>();
		WK_GOBUS_STUDENT gobus_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				gobus_list = new WK_GOBUS_STUDENT();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Gob_Stu_Code")) {
						gobus_list.PK_Gob_Stu_Code = jsonObject
								.getString("PK_Gob_Stu_Code");
					}
					if (jsonObject.has("FK_Gob_Gob_Stu_Code")) {
						gobus_list.FK_Gob_Gob_Stu_Code = jsonObject
								.getString("FK_Gob_Gob_Stu_Code");
					}
					if (jsonObject.has("FK_Sch_Gob_Stu_Code")) {
						gobus_list.FK_Sch_Gob_Stu_Code = jsonObject
								.getString("FK_Sch_Gob_Stu_Code");
					}
					if (jsonObject.has("FK_Stu_Gob_Stu_Code")) {
						gobus_list.FK_Stu_Gob_Stu_Code = jsonObject
								.getString("FK_Stu_Gob_Stu_Code");
					}
					if (jsonObject.has("Gob_Stu_Address")) {
						gobus_list.Gob_Stu_Address = jsonObject
								.getString("Gob_Stu_Address");
					}
					if (jsonObject.has("Gob_Stu_Order")) {
						gobus_list.Gob_Stu_Order = jsonObject
								.getString("Gob_Stu_Order");
					}
				}
				list.add(gobus_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	
	public static ArrayList<WK_BACKBUS_STUDENT> backbus_student(String message) {
		ArrayList<WK_BACKBUS_STUDENT> list = new ArrayList<WK_BACKBUS_STUDENT>();
		WK_BACKBUS_STUDENT backbus_list;
		JSONObject jsonObject;
		try {
			JSONArray jsonArray = new JSONArray(message);
			for (int i = 0; i < jsonArray.length(); i++) {
				jsonObject = jsonArray.getJSONObject(i);
				backbus_list = new WK_BACKBUS_STUDENT();
				if (jsonObject != null) {
					if (jsonObject.has("PK_Bac_Stu_Code")) {
						backbus_list.PK_Bac_Stu_Code = jsonObject
								.getString("PK_Bac_Stu_Code");
					}
					if (jsonObject.has("FK_Bac_Bac_Stu_Code")) {
						backbus_list.FK_Bac_Bac_Stu_Code = jsonObject
								.getString("FK_Bac_Bac_Stu_Code");
					}
					if (jsonObject.has("FK_Sch_Bac_Stu_Code")) {
						backbus_list.FK_Sch_Bac_Stu_Code = jsonObject
								.getString("FK_Sch_Bac_Stu_Code");
					}
					if (jsonObject.has("FK_Stu_Bac_Stu_Code")) {
						backbus_list.FK_Stu_Bac_Stu_Code = jsonObject
								.getString("FK_Stu_Bac_Stu_Code");
					}
					if (jsonObject.has("Bac_Stu_Address")) {
						backbus_list.Bac_Stu_Address = jsonObject
								.getString("Bac_Stu_Address");
					}
					if (jsonObject.has("Bac_Stu_Order")) {
						backbus_list.Bac_Stu_Order = jsonObject
								.getString("Bac_Stu_Order");
					}
				}
				list.add(backbus_list);
			}
		} catch (Exception e) {
			return list;
		}
		return list;
	}
	/** 자녀찾기 자녀정보 */
	public static WK_MEMBERSTUDENT_CONNECT_LOAD Main_MemberStudent_Connect_Load(String message) {

		WK_MEMBERSTUDENT_CONNECT_LOAD children_load = new WK_MEMBERSTUDENT_CONNECT_LOAD();
		try {
			JSONObject jsonObject = new JSONObject(message);
			if (jsonObject != null) {
				if (jsonObject.has("PK_Stu_Code")) {
					children_load.PK_Stu_Code = jsonObject.getString("PK_Stu_Code");
				}
				if (jsonObject.has("FK_Sch_Stu_Code")) {
					children_load.FK_Sch_Stu_Code = jsonObject.getString("FK_Sch_Stu_Code");
				}
				if (jsonObject.has("FK_Cla_Stu_Code")) {
					children_load.FK_Cla_Stu_Code = jsonObject.getString("FK_Cla_Stu_Code");
				}
				if (jsonObject.has("FK_Bea_Stu_Code")) {
					children_load.FK_Bea_Stu_Code = jsonObject.getString("FK_Bea_Stu_Code");
				}
				if (jsonObject.has("Stu_Name")) {
					children_load.Stu_Name = jsonObject.getString("Stu_Name");
				}
				if (jsonObject.has("Stu_Birth")) {
					children_load.Stu_Birth = jsonObject.getString("Stu_Birth");
				}
				if (jsonObject.has("Stu_Info")) {
					children_load.Stu_Info = jsonObject.getString("Stu_Info");
				}
				if (jsonObject.has("Stu_Photo")) {
					children_load.Stu_Photo = jsonObject.getString("Stu_Photo");
				}
				if (jsonObject.has("check")) {
					children_load.check = jsonObject.getString("check");
				}
				if (jsonObject.has("schoolname")) {
					children_load.schoolname = jsonObject.getString("schoolname");
				}
				if (jsonObject.has("schoolclass")) {
					children_load.schoolclass = jsonObject.getString("schoolclass");
				}
			}
		} catch (Exception e) {
			return children_load;
		}
		return children_load;
	}
}// CLASS_END
